home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 5
/
Merciful - Disc 5.iso
/
software
/
r
/
real_3d
/
real3dv3.3b.dms
/
real3dv3.3b.adf
/
RPL.LZH
/
RPL
/
absskel.rpl
next >
Wrap
Text File
|
1995-05-01
|
2KB
|
99 lines
(
( This program removes the displacement between a skeleton joint and an
( inverse kinem. curve ie. sets VOFF tags to [0,0,0] for all objects whose
( parent object is INVKINEM object
(
"objects.rpl" LOAD
"locks.rpl" LOAD
"tags.rpl" LOAD
( this function goes through the sub objects of given object and clears
( all VOFF tags.
: AsClearVOFF
PARAM
VARIABLE aObject
ENDPARAM
( loop through sub objects of the given object
aObject FETCH O_GETSUB
BEGIN
DUP
WHILE
DUP
IF
DUP "VOFF" O_FETCHTAG DUP
IF
0 0 0 4 ROLL VSTORE
ELSE
DROP
ENDIF
ENDIF
O_GETNEXT
REPEAT
DROP
;
: AsVOFF
PARAM
VARIABLE aObject
ENDPARAM
aObject FETCH "SMTH" O_FETCHTAG DUP ( is this an animation method
IF
"INV KINEMATIC" COMPARE NOT ( yes, is it inv kinem. object
IF
aObject FETCH AsClearVOFF ( yes, handle param curves
ENDIF
ELSE
DROP
ENDIF
;
( Recursively handle given object
: AsHandleObject
PARAM
VARIABLE aObj
ENDPARAM
aObj FETCH AsVOFF
aObj FETCH O_GETSUB
BEGIN DUP WHILE
DUP AsHandleObject
O_GETNEXT
REPEAT
DROP
;
( Re-establish selected objects
: AsMakeAbsolute
( Lock object data
iLOCK_SHARED O_LOCK
( fetch selected objects on stack
O_GETSEL
( scan through selected objects and call 'ReEstabl'
BEGIN
DUP
WHILE
AsHandleObject
REPEAT
DROP
( release object data
iLOCK_REMOVE O_LOCK
;
( call Re-Establish when this file is loaded
AsMakeAbsolute
( Get rid of ReEstablish
FORGET AsClearVOFF